/*
 * @Author: anshengtyp
 * @Date: 2024-03-27 16:39:42
 * @LastEditTime: 2025-02-17 10:42:47
 * @LastEditors: typ
 * @Description: 
 */
import { createWebHistory, createRouter } from 'vue-router';


const constantRoutes = [
  {
    path: '/view',
    component: () => import('@/views/view/index.vue'),
  },
  {
    path: '/organizeView',
    component: () => import('@/views/organizeView/index.vue'),
  },
  {
    path: '/noAuth',
    component: () => import('@/views/noaccess/index.vue'),
  },
  {
    path: '/thingPreview',
    component: () => import('@/views/thingPreview/index.vue'),
  },
  {
    path: '/3dtilesPreview',
    component: () => import('@/views/3dtilesPreview/index.vue'),
  },
]

const router = createRouter({
  history: createWebHistory(),
  routes: constantRoutes,
  scrollBehavior(to, from, savedPosition) {
    if (savedPosition) {
      return savedPosition
    } else {
      return { top: 0 }
    }
  },
});





export default router;
